﻿namespace Chapter04.NormalMode {
    public class PizzaStroe {
        public IPizza OrderPizza(string type) {
            IPizza pizza = type switch {
                "cheese" => new CheesePizza(),
                "greek" => new GreekPizza(),
                "pepperini" => new PepperoniPizza(),
                "clam" => new ClamPizza(),
                "veggie" => new VeggiePizza(),
                _ => throw new NotImplementedException(),
            };
            pizza.Prepare();
            pizza.Bake();
            pizza.Cut();
            pizza.Box();
            return pizza;
        }
    }
}
